



#ifndef __DRV_LCD_H__
#define __DRV_LCD_H__

#include <stdint.h>

#define REVERSE_X       (1<<0)
#define REVERSE_Y       (1<<1)
#define REVERSE_MODE    (1<<2)

#define PV_OFFSET 0

#define DEFAULT_LCD_CONFIG {\
    width:480,\
    height:272,\
    bits_pixel:18,\
    timing:\
    {\
        pixel_clock_hz:10000000,\
        h_front_porch:8,\
        h_back_porch:43,\
        h_sync_len:4,\
        v_front_porch:8,\
        v_back_porch:12,\
        v_sync_len:4,\
        h_sync_active:0,\
        v_sync_active:0,\
        den_active:1,\
        clk_active:0\
    },\
    swap_flag:0,\
    ctp_flag:0\
}
#define DEFAULT_BITS_PIXEL      (18)    //565->16   666->18
#define DEFAULT_PIXEL_CLOCK_HZ  (33000000)
#define DEFAULT_H_FRONT_PORCH   (40)
#define DEFAULT_H_BACK_PORCH    (87)
#define DEFAULT_H_SYNC_LEN      (1)
#define DEFAULT_V_FRONT_PORCH   (13)
#define DEFAULT_V_BACK_PORCH    (31)
#define DEFAULT_V_SYNC_LEN      (1)
#define DEFAULT_H_SYNC_ACTIVE   (0)
#define DEFAULT_V_SYNC_ACTIVE   (0)


int rt_hw_lcd_init(void);
rt_uint32_t *lcd_get_framebuffer(void *dev);

#define FBIOGET_FSCREENINFO     0x4602

struct fb_fix_screeninfo
{
    char id[16];
    unsigned long smem_start;
    uint32_t smem_len;

    uint32_t line_length;
};


#endif
